<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('附件列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>文件名：</p>
                                <input type="text" name="accename"/>
                            </li>
                            <li>
                                <p>上传人：</p>
                                <input type="text" name="operator"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="supervise:Accessories:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="supervise:Accessories:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="supervise:Accessories:remove">
                    <i class="fa fa-remove"></i> 删除
                </a> 
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="supervise:Accessories:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
                 
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('supervise:Accessories:edit')}]];
        var removeFlag = [[${@permission.hasPermi('supervise:Accessories:remove')}]];
        var detailFlag = [[${@permission.hasPermi('supervise:Accessories:detail')}]];
        var prefix = ctx + "supervise/Accessories";

        $(function() {
            var options = {
              
                modalName: "附件",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'guid', 
                    title : '标示符',
                    visible: false
                },
                {
                    field : 'accename', 
                    title : '文件名'
                },
                {
                    field : 'acceid', 
                    title : '附加项'
                },
                {
                    field : 'operator', 
                    title : '上传人'
                },
                {
                    field : 'createdate', 
                    title : '上传日期'
                },
                {
                    field : 'categoryid', 
                    title : '类型'
                },
                {
                    field : 'ownerguid', 
                    title : '拥有者标识符'
                },
                {
                    field : 'unit', 
                    title : '单位'
                },
                {
                    field : 'sortid', 
                    title : '分类'
                },
                {
                    field : 'copyguid', 
                    title : '副本标识符'
                },
                {
                    field : 'url', 
                    title : '附件url'
                },
                {
                    field : 'localpath', 
                    title : '路径'
                },
                {
                    field : 'systemid', 
                    title : '上传来源标识'
                },
                {
                    field : 'iscompleted', 
                    title : '是否完成上传'
                },
                {
                    field : 'completedtime', 
                    title : '完成上传时间'
                }
                 ,
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        /* actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.guid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.guid + '\')"><i class="fa fa-remove"></i>删除</a>'); */
                        actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailFull(\'' + row.guid + '\')"><i class="fa fa-edit"></i>详情</a> ');
                        return actions.join('');
                    }
                } 
                ]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>